package yaner.hotel.manager.api.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(topic = "${rocketmq.topics.order}",
        consumeMode = ConsumeMode.ORDERLY,
        consumerGroup = "${rocketmq.consumer.group}")
public class OrderListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("接收到消息：" + s);
    }

}
